You can not copy data from them and you have to push the button every time
it pops up - absolutely terrible.
In this case it's probably way better to add a "Description" tab with big
message box for description and bind it to the same data view so it would be
updated automatically.
Anyway, if you'd like to carry out your original message box idea, here's
how to access selected row:
dataView(dataGrid.CurrentRowIndex)("ColumNameOrIndex")
--
Best regards,
Ilya
This posting is provided "AS IS" with no warranties, and confers no rights.
*** Want to find answers instantly? Here's how... ***
1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
"Rob Morriss" <RobMo...@discussions.microsoft.com> wrote in message
news:25765FBB-1460-4376...@microsoft.com...
>I have a grid bound to a dataview. I want the user to be able to select a
> cell, then in the menu select 'description' which would show a messagebox
> containing a description of the item in that row. The description is in a
> hidden column on the selected row. I can't seem to retrieve the dataview
> information based on the selected row in the datagrid. How can I do this?
Anyway, I had already tried what I think is the C# equivalent to what you
suggested:
dataRow = dataView.Table.Rows[dataGrid.CurrentRowIndex]
But my problem was that dataRow was assigned the row indexed by the DataSet,
once I applied a filter and sort to dataView, the results returned were
incorrect.
Anyway, I 'solved' the problem by adding a 0-width description column to the
grid.
Thanks,
Rob
And you're correct; row index in DataTable can be different from row index
in DataView due to sorting and filtering.
Here's how to get correct DataRow:
dataRow = dataView[dataGrid.CurrentRowIndex].Row;
--
Best regards,
Ilya
This posting is provided "AS IS" with no warranties, and confers no rights.
*** Want to find answers instantly? Here's how... ***
1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
"Rob Morriss" <RobMo...@discussions.microsoft.com> wrote in message
news:C6E00B5F-A95C-40DC...@microsoft.com...